package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SkillMapper;
import com.ruoyi.system.domain.Skill;
import com.ruoyi.system.service.ISkillService;

/**
 * 职业技能Service业务层处理
 * 
 * @author WEI&WU
 * @date 2024-05-25
 */
@Service
public class SkillServiceImpl implements ISkillService 
{
    @Autowired
    private SkillMapper skillMapper;

    /**
     * 查询职业技能
     * 
     * @param certificateId 职业技能主键
     * @return 职业技能
     */
    @Override
    public Skill selectSkillByCertificateId(String certificateId)
    {
        return skillMapper.selectSkillByCertificateId(certificateId);
    }

    /**
     * 查询职业技能列表
     * 
     * @param skill 职业技能
     * @return 职业技能
     */
    @Override
    public List<Skill> selectSkillList(Skill skill)
    {
        return skillMapper.selectSkillList(skill);
    }

    /**
     * 新增职业技能
     * 
     * @param skill 职业技能
     * @return 结果
     */
    @Override
    public int insertSkill(Skill skill)
    {
        return skillMapper.insertSkill(skill);
    }

    /**
     * 修改职业技能
     * 
     * @param skill 职业技能
     * @return 结果
     */
    @Override
    public int updateSkill(Skill skill)
    {
        return skillMapper.updateSkill(skill);
    }

    /**
     * 批量删除职业技能
     * 
     * @param certificateIds 需要删除的职业技能主键
     * @return 结果
     */
    @Override
    public int deleteSkillByCertificateIds(String[] certificateIds)
    {
        return skillMapper.deleteSkillByCertificateIds(certificateIds);
    }

    /**
     * 删除职业技能信息
     * 
     * @param certificateId 职业技能主键
     * @return 结果
     */
    @Override
    public int deleteSkillByCertificateId(String certificateId)
    {
        return skillMapper.deleteSkillByCertificateId(certificateId);
    }
}
